#include("LayuiHead.html")
<div class="layui-fluid layui-card ">
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">输入示例</li>
            <li>查看原码</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form action="" class="layui-form  margin-10" lay-filter="form">
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <div class="layui-form-item">
                                <label class="layui-form-label">数字加减</label>

                                <div class="layui-input-inline" style="width:70px">
                                    <input type="text" class="layui-hide" lay-skin="mynumber" autocomplete="off" value="2" step="0.01" name="test_number">
                                </div>
                                <div class="layui-input-inline" style="width:70px">
                                    <input type="text" class="layui-hide" lay-skin="mynumber" value="2" name="test_number2">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <div class="layui-form-item">
                                <label class="layui-form-label">备注</label>

                                <div class="layui-input-block">
                                    <textarea name="test_desc" placeholder="请输入备注" class="layui-textarea" style="height:60px"></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button type="submit" class="layui-btn" lay-submit="" lay-filter="Submit1">立即提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </div>
            <div class="layui-tab-item">
                 <pre class="layui-code" lay-lang="HTML" lay-title="对应的HTML结构1" encode="true">
                 &lt;input type="text" class="layui-hide" lay-skin="mynumber" value="2" name="test_number2"&gt;
                </pre>
                  <pre class="layui-code" lay-lang="HTML" lay-title="对应的HTML结构2" encode="true">
                       &lt;input type="text" class="layui-hide" lay-skin="mynumber" autocomplete="off" value="2" step="0.01" name="test_number"&gt;
                </pre>
                <pre class="layui-code" lay-lang="JS" lay-title="对应的JS代码">
layui.use(['myNumber'], function () {
        layui.myNumber.render({});
    });
                </pre>
            </div>
        </div>
    </div>
</div>
<script>
    var TreeInit = 'Number';
    layui.use(['myNumber'], function () {
        layui.myNumber.render({});
    });

    layui.use(['form', 'myTool'], function () {
        layui.form.on('submit(Submit1)', function (data) {
            top.layer.alert('1：' + data.field.test_number + '<br/>2：' + data.field.test_number2, {offset: "100px"});
            return false;
        });
    });

</script>
#include("LayuiBottom.html")